package com.glsc.ngateway.common.base.repo.mysql.gateway.platform.system;

import com.glsc.ngateway.common.base.domain.mysql.gateway.system.SystemGroup;
import com.glsc.ngateway.common.base.domain.mysql.gateway.system.SystemVendorContractRelation;
import feign.Param;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface SystemVendorContractRelationRepository extends JpaRepository<SystemVendorContractRelation, Integer>, JpaSpecificationExecutor<SystemGroup> {

    void deleteByVendorIdAndContactType(Integer vendorId,String contactType);

    List<SystemVendorContractRelation> queryAllByVendorIdAndContactType(@Param("vendorId") Integer vendorId,@Param("contactType")String contactType);

}